package com.cheng.example.book.advise151.chap4;

import java.text.Collator;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Locale;

public class Client59 {
    public static void main(String[] args) {
//        String[] strs = { "张三(Z)", "李四(L)", "王五(W)" };
        String[] strs = { "犇(B)", "鑫(X)", "淼(M)" };
        //定义一个中文排序器
        Comparator c = Collator.getInstance(Locale.CHINA);
        Arrays.sort(strs,c);
        int i = 0;
        for (String str : strs) {
            System.out.println((++i) + "、" + str);
        }


    }

}
